home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / mspool.arc / MSPOOL.DOC < prev   
Encoding:
Text File  |  1986-06-04  |  8.0 KB  |  154 lines

  1.                       Multi Spooler Ver. 2                              
  2.                          for the IBM PC
  3.                          by Rich Winkel
  4.                           Columbia, Mo.
  5.  
  6.                    For free distribution only
  7.  
  8.                         Mspool2 Features
  9.  
  10.      Allows spooling up to 4 printers simultaneously. Supports both parallel 
  11.      and serial printers in any combination. 
  12.  
  13.      Has a user selectable buffer size up to 63K bytes. Sensitive to competing 
  14.      demands for CPU time.  Won't slow down foreground jobs. Allows 
  15.      cancellation of an on-going print operation. Can be 'disabled' for use 
  16.      with programs which are incompatible with it's operation. 
  17.  
  18.  
  19. Usage:    
  20.  
  21. To install the spooler, at the DOS prompt type:
  22.  
  23.           MSPOOL a b c
  24. where:
  25.  
  26. a (= 1 - 4) represents the four possible printers on the PC.
  27.             (1, 2 & 3 correspond to LPT1, LPT2 & LPT3)
  28.  
  29. b (= 1 - 9) represents the number of 7K chunks of memory to set 
  30.             aside for the spooler buffer.
  31.  
  32. c (= 1 - 4) is an optional parameter used when you wish the
  33.             output to be directed to a serial port.
  34.             (1 and 2 correspond to COM1 and COM2)
  35.        
  36.       
  37.       Once the spooler is installed, the user need not worry about it further; 
  38.   it will begin intercepting all print operations and buffering them.  However, 
  39.   the operation of the spooler can be modified after it has been installed, if 
  40.   the need arises.  After the spooler has been installed, if you type: 
  41.  
  42.           MSPOOL a
  43.  
  44.   where  'a'  is the same 'a'  you used to install it,  you are presented with  
  45.   three options: Purge, Disable or Enable.  These are as follows: 
  46.  
  47. Purge:    Drops any characters remaining in the spooler buffer. This has the 
  48.   effect of canceling any printing operation currently taking place. 
  49.  
  50. Disable:  A few programs for the PC operate in a way which interferes with 
  51.   MSPOOL's  ability  to send characters to the printer.   The result  is  that 
  52.   MSPOOL  captures the characters,  but doesn't actually begin  printing  them 
  53.   until it's buffer is full or you exit your program.  'Disabling' the spooler 
  54.   (prior  to  running your program)  keeps the number of  characters  in  it's 
  55.   buffer  from  growing.    That  is,  every time  the  spooler  intercepts  a 
  56.   character,  it prints a character.   If it's buffer is empty,  it's as if it 
  57.   wasn't there at all.  It simply prints the  character  it  gets when it gets 
  58.   it.  If there are characters in the buffer at the time the offending program 
  59.   is  invoked,   then when it gets a character to print,  it fetches the  next 
  60.   character in line and prints it,  and puts the new character at  the end  of 
  61.   the queue. 
  62.           
  63. Enable:   Re-enables spooling.
  64.              
  65.    Hitting any key other than P, D or E has no effect. 
  66.  
  67. Notes:    
  68.  
  69.   To  spool to a serial printer,  first initialize the COM port with the  MODE 
  70.   command:   MODE COMc:baud,parity,databits,stopbits etc.   DO NOT use  the  P 
  71.   (continuous retry) option.  
  72.     
  73.     Then install MSPOOL: MSPOOL a b c.  
  74.  
  75.    This  will route all output for LPTa through the spooler to the COMc  port.  
  76.    DO NOT use the MODE redirect command. 
  77.          
  78.         (i.e. don't use MODE LPT#:=COMn) 
  79.  
  80.   To  spool  to  more  than one printer,  just  run  the  spooler  repeatedly, 
  81.   specifying each printer in turn.  
  82.  
  83.   When  spooling to more than one printer,  in certain circumstances (see tech 
  84.   hype below)  the last spooler loaded will have priority,  then the second to 
  85.   last. 
  86.  
  87.   In order for the Purge, Disable, Enable routine to work, you should load the 
  88.   spooler(s)  last among the 'resident' routine(s)  which affect the operation 
  89.   of any printer.   For instance,  if you use GRAPHICS.COM,  you should run it 
  90.   before running MSPOOL. 
  91.  
  92.   Once the spooler is installed,  it's output cannot be re-directed to another 
  93.   port, so programs written for this purpose (such as QSWAP) will not work. 
  94.  
  95.   The  ability  to  redirect  to  a COM port could be put  to  good  use  when 
  96.   uploading a large file to another computer when no handshaking (XON/XOFF  or 
  97.   XMODEM) protocol is required. (Especially if you are limited to 300 baud) 
  98.  
  99.   More DOS Bugs!  Apparently, FORMAT & DISKCOPY will not work properly if they 
  100.   do  not reside low enough in memory,  so if you have trouble with either  of 
  101.   these  commands  and you have a large spooler buffer or a  lot  of  resident 
  102.   routines  installed,  try rebooting without the resident routines or  reduce 
  103.   the spooler buffer size and try again.   (This problem appears to be similar 
  104.   to the one which arises if you have too much memory.) 
  105.  
  106.  Technical hype: 
  107.  
  108.        This spooler intercepts 2 interrupts: Printer I/O (INT 17H), 
  109.   and Keyboard I/O (INT 16H).   At installation, it stores the old vectors for 
  110.   these  interrupts  internally  and substitutes it's  own  addresses  in  the 
  111.   interrupt vector table.  
  112.        Any call to print is checked as to whether it references the 
  113.   spooler's  printer.    If not,  it is passed on to the the old  printer  I/O 
  114.   handler.  (could be another spooler, GRAPHICS.COM, the  ROM routine etc.)  If 
  115.   it  does  reference  the  spooler's printer,  the character is  put  in  the 
  116.   spooler's buffer,  and the buffer is checked to see if it's full.   If  not, 
  117.    the 
  118.   spooler returns to the calling program.   Otherwise,  the spooler prints the 
  119.   next character waiting in the buffer, then returns.  If the spooler has been 
  120.   'disabled', it always prints the next character in the buffer, regardless of 
  121.   whether  the  buffer is full.  Whenever a program makes a keyboard I/O  call 
  122.   (INT  16H),  the spooler checks whether it has a character to print in  it's 
  123.   buffer.  If not, it passes control to the old keyboard I/O routine (could be 
  124.   another spooler, the ROM routine etc.).   Otherwise, it makes one attempt to 
  125.   print a character.   It then checks to see if the keyboard call will require 
  126.   the  keyboard I/O routine to wait for a  character to  be entered  from  the 
  127.   keyboard if no character is already in the keyboard buffer.    If  not,   it 
  128.   passes control to the old keyboard  I/O handler.  Otherwise, it looks at the 
  129.   BUFFER_HEAD and BUFFER_TAIL words in the ROM BIOS data area to determine  if 
  130.   there  is  a character in the keyboard  buffer.    If there  is,  it  passes 
  131.   control.   Otherwise,  it begins looping, repeatedly attempting to print and 
  132.   checking the keyboard  buffer  until  it  either runs out of characters or a 
  133.   character  is entered  at the keyboard.   It is during this looping  process 
  134.   that  the  most  recently installed spooler will get the  highest  priority.  
  135.  
  136.   Whenever mspool is run, it checks where the printer I/O interrupt vector  is 
  137.   pointing to determine whether it has already been installed.   If it doesn't 
  138.   find  a copy of itself there,  it assumes it is not installed and  continues 
  139.   with installation.   If there is a copy of itself,  it checks to see whether 
  140.   the  copy  is  configured to intercept  calls to the  same  printer  as  was 
  141.   specified in it's own parameter list (parm 1).  If not,  it gets the segment 
  142.   for the next printer I/O handler up the line from the copy and  repeats  the 
  143.   same  procedure  until  it either lands in unfamiliar territory or  finds  a 
  144.   spooler  configured  for  it's printer.   If it finds one  with  the  proper 
  145.   configuration,  it presents you with the 'Purge,  Disable,  Enable'  option.  
  146.   Otherwise,  it continues with installation. During installation, the spooler 
  147.   is  patched  in  accordance  with the parameters passed to it  by  DOS,   to 
  148.   customize for parallel or serial printing,  buffer size,  LPT number and the 
  149.   addresses  of  the old interrupt routines gotten from the  interrupt  vector 
  150.   table.   The legal ranges for the printer number and serial port number  are 
  151.   due to the fact that there is space for 4 ports in both the printer  and RS-
  152.   232 tables. 
  153. 
  154.